<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="客户端独立部署到生产主机场景、如何在生产主机上添加环境变量（适用于1.5.0SPC13及后续版本）">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="DWS_00109.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="">
<meta name="DC.Publisher" content="20250306">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="DWS_00128">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>客户端独立部署到生产主机场景、如何在生产主机上添加环境变量（适用于1.5.0SPC13及后续版本）</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="DWS_00128"></a><a name="DWS_00128"></a>

<h1 class="topictitle1">客户端独立部署到生产主机场景、如何在生产主机上添加环境变量（适用于1.5.0SPC13及后续版本）</h1>
<div><p>客户端独立部署到生产主机场景，完成客户端的部署后，需在部署了客户端的各个主机上添加环境变量，否则Roach命令将执行失败。</p>
<div class="section"><h4 class="sectiontitle">操作步骤</h4><ol><li><span>使用PuTTY，登录已部署客户端的GaussDB(DWS)集群的所有CN节点。</span></li><li><span>执行以下命令，进入<strong>env</strong>文件，以用户名<strong>omm</strong>为例。</span><p><pre class="screen">vi /home/<em>omm</em>/profile/env</pre>
<div class="p">确认<strong>env</strong>文件中已添加以下内容，以客户端安装目录<strong>/opt</strong>为例。<pre class="screen">export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<em>opt</em>/DataBackup/ProtectClient/interfaces/xbsa/lib</pre>
</div>
</p></li><li><span>执行以下命令，进入<strong>.bashrc</strong>文件，以用户名<strong>omm</strong>为例。</span><p><pre class="screen">vi /home/<em>omm</em>/.bashrc</pre>
<div class="p">确认<strong>.bashrc</strong>文件中已添加以下内容，以客户端安装目录<strong>/opt</strong>为例。<pre class="screen">export DATA_BACKUP_AGENT_HOME=/<em>opt</em></pre>
</div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="DWS_00109.html">常见问题</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>